3.889 \(\int \frac{d+e x}{x^4 (a+b x+c x^2)} \, dx\)

Optimal. Leaf size=204 \[ -\frac{\left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^4 \sqrt{b^2-4 a c}}+\frac{\left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac{-a b e-a c d+b^2 d}{a^3 x}-\frac{\log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )}{a^4}+\frac{b d-a e}{2 a^2 x^2}-\frac{d}{3 a x^3} \]

[Out]

-d/(3*a*x^3) + (b*d - a*e)/(2*a^2*x^2) - (b^2*d - a*c*d - a*b*e)/(a^3*x) - ((b^4*d - 4*a*b^2*c*d + 2*a^2*c^2*d
 - a*b^3*e + 3*a^2*b*c*e)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(a^4*Sqrt[b^2 - 4*a*c]) - ((b^3*d - 2*a*b*c*
d - a*b^2*e + a^2*c*e)*Log[x])/a^4 + ((b^3*d - 2*a*b*c*d - a*b^2*e + a^2*c*e)*Log[a + b*x + c*x^2])/(2*a^4)

________________________________________________________________________________________

Rubi [A]  time = 0.286073, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {800, 634, 618, 206, 628} \[ -\frac{\left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^4 \sqrt{b^2-4 a c}}+\frac{\left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac{-a b e-a c d+b^2 d}{a^3 x}-\frac{\log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )}{a^4}+\frac{b d-a e}{2 a^2 x^2}-\frac{d}{3 a x^3} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(x^4*(a + b*x + c*x^2)),x]

[Out]

-d/(3*a*x^3) + (b*d - a*e)/(2*a^2*x^2) - (b^2*d - a*c*d - a*b*e)/(a^3*x) - ((b^4*d - 4*a*b^2*c*d + 2*a^2*c^2*d
 - a*b^3*e + 3*a^2*b*c*e)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(a^4*Sqrt[b^2 - 4*a*c]) - ((b^3*d - 2*a*b*c*
d - a*b^2*e + a^2*c*e)*Log[x])/a^4 + ((b^3*d - 2*a*b*c*d - a*b^2*e + a^2*c*e)*Log[a + b*x + c*x^2])/(2*a^4)

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{d+e x}{x^4 \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac{d}{a x^4}+\frac{-b d+a e}{a^2 x^3}+\frac{b^2 d-a c d-a b e}{a^3 x^2}+\frac{-b^3 d+2 a b c d+a b^2 e-a^2 c e}{a^4 x}+\frac{b^4 d-3 a b^2 c d+a^2 c^2 d-a b^3 e+2 a^2 b c e+c \left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) x}{a^4 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\int \frac{b^4 d-3 a b^2 c d+a^2 c^2 d-a b^3 e+2 a^2 b c e+c \left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) x}{a+b x+c x^2} \, dx}{a^4}\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 a^4}+\frac{\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 a^4}\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log \left (a+b x+c x^2\right )}{2 a^4}-\frac{\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^4}\\ &=-\frac{d}{3 a x^3}+\frac{b d-a e}{2 a^2 x^2}-\frac{b^2 d-a c d-a b e}{a^3 x}-\frac{\left (b^4 d-4 a b^2 c d+2 a^2 c^2 d-a b^3 e+3 a^2 b c e\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^4 \sqrt{b^2-4 a c}}-\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log (x)}{a^4}+\frac{\left (b^3 d-2 a b c d-a b^2 e+a^2 c e\right ) \log \left (a+b x+c x^2\right )}{2 a^4}\\ \end{align*}

Mathematica [A]  time = 0.144197, size = 196, normalized size = 0.96 \[ \frac{\frac{6 \left (3 a^2 b c e+2 a^2 c^2 d-4 a b^2 c d-a b^3 e+b^4 d\right ) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}-6 \log (x) \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right )+3 \left (a^2 c e-a b^2 e-2 a b c d+b^3 d\right ) \log (a+x (b+c x))+\frac{3 a^2 (b d-a e)}{x^2}-\frac{2 a^3 d}{x^3}+\frac{6 a \left (a b e+a c d+b^2 (-d)\right )}{x}}{6 a^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(x^4*(a + b*x + c*x^2)),x]

[Out]

((-2*a^3*d)/x^3 + (3*a^2*(b*d - a*e))/x^2 + (6*a*(-(b^2*d) + a*c*d + a*b*e))/x + (6*(b^4*d - 4*a*b^2*c*d + 2*a
^2*c^2*d - a*b^3*e + 3*a^2*b*c*e)*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] - 6*(b^3*d - 2*a*
b*c*d - a*b^2*e + a^2*c*e)*Log[x] + 3*(b^3*d - 2*a*b*c*d - a*b^2*e + a^2*c*e)*Log[a + x*(b + c*x)])/(6*a^4)

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 381, normalized size = 1.9 \begin{align*} -{\frac{d}{3\,a{x}^{3}}}-{\frac{e}{2\,a{x}^{2}}}+{\frac{bd}{2\,{a}^{2}{x}^{2}}}+{\frac{be}{{a}^{2}x}}+{\frac{cd}{{a}^{2}x}}-{\frac{{b}^{2}d}{{a}^{3}x}}-{\frac{ce\ln \left ( x \right ) }{{a}^{2}}}+{\frac{\ln \left ( x \right ){b}^{2}e}{{a}^{3}}}+2\,{\frac{\ln \left ( x \right ) bcd}{{a}^{3}}}-{\frac{\ln \left ( x \right ){b}^{3}d}{{a}^{4}}}+{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) e}{2\,{a}^{2}}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{2}e}{2\,{a}^{3}}}-{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) bd}{{a}^{3}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{3}d}{2\,{a}^{4}}}+3\,{\frac{ceb}{{a}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+2\,{\frac{d{c}^{2}}{{a}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{{b}^{3}e}{{a}^{3}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-4\,{\frac{cd{b}^{2}}{{a}^{3}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{4}d}{{a}^{4}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/x^4/(c*x^2+b*x+a),x)

[Out]

-1/3*d/a/x^3-1/2*e/a/x^2+1/2/a^2/x^2*b*d+1/a^2/x*b*e+c*d/a^2/x-1/a^3/x*b^2*d-c*e*ln(x)/a^2+1/a^3*ln(x)*b^2*e+2
/a^3*ln(x)*b*c*d-1/a^4*ln(x)*b^3*d+1/2/a^2*c*ln(c*x^2+b*x+a)*e-1/2/a^3*ln(c*x^2+b*x+a)*b^2*e-1/a^3*c*ln(c*x^2+
b*x+a)*b*d+1/2/a^4*ln(c*x^2+b*x+a)*b^3*d+3/a^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b*c*e+2/a
^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*c^2*d-1/a^3/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c
-b^2)^(1/2))*b^3*e-4/a^3/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2*c*d+1/a^4/(4*a*c-b^2)^(1/2)
*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^4*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x^4/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 8.55927, size = 1449, normalized size = 7.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x^4/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

[1/6*(3*sqrt(b^2 - 4*a*c)*((b^4 - 4*a*b^2*c + 2*a^2*c^2)*d - (a*b^3 - 3*a^2*b*c)*e)*x^3*log((2*c^2*x^2 + 2*b*c
*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c*x^2 + b*x + a)) + 3*((b^5 - 6*a*b^3*c + 8*a^2*b*c^2)*d -
(a*b^4 - 5*a^2*b^2*c + 4*a^3*c^2)*e)*x^3*log(c*x^2 + b*x + a) - 6*((b^5 - 6*a*b^3*c + 8*a^2*b*c^2)*d - (a*b^4
- 5*a^2*b^2*c + 4*a^3*c^2)*e)*x^3*log(x) - 6*((a*b^4 - 5*a^2*b^2*c + 4*a^3*c^2)*d - (a^2*b^3 - 4*a^3*b*c)*e)*x
^2 - 2*(a^3*b^2 - 4*a^4*c)*d + 3*((a^2*b^3 - 4*a^3*b*c)*d - (a^3*b^2 - 4*a^4*c)*e)*x)/((a^4*b^2 - 4*a^5*c)*x^3
), -1/6*(6*sqrt(-b^2 + 4*a*c)*((b^4 - 4*a*b^2*c + 2*a^2*c^2)*d - (a*b^3 - 3*a^2*b*c)*e)*x^3*arctan(-sqrt(-b^2
+ 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) - 3*((b^5 - 6*a*b^3*c + 8*a^2*b*c^2)*d - (a*b^4 - 5*a^2*b^2*c + 4*a^3*c^2)
*e)*x^3*log(c*x^2 + b*x + a) + 6*((b^5 - 6*a*b^3*c + 8*a^2*b*c^2)*d - (a*b^4 - 5*a^2*b^2*c + 4*a^3*c^2)*e)*x^3
*log(x) + 6*((a*b^4 - 5*a^2*b^2*c + 4*a^3*c^2)*d - (a^2*b^3 - 4*a^3*b*c)*e)*x^2 + 2*(a^3*b^2 - 4*a^4*c)*d - 3*
((a^2*b^3 - 4*a^3*b*c)*d - (a^3*b^2 - 4*a^4*c)*e)*x)/((a^4*b^2 - 4*a^5*c)*x^3)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x**4/(c*x**2+b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.17995, size = 289, normalized size = 1.42 \begin{align*} \frac{{\left (b^{3} d - 2 \, a b c d - a b^{2} e + a^{2} c e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, a^{4}} - \frac{{\left (b^{3} d - 2 \, a b c d - a b^{2} e + a^{2} c e\right )} \log \left ({\left | x \right |}\right )}{a^{4}} + \frac{{\left (b^{4} d - 4 \, a b^{2} c d + 2 \, a^{2} c^{2} d - a b^{3} e + 3 \, a^{2} b c e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} a^{4}} - \frac{2 \, a^{3} d + 6 \,{\left (a b^{2} d - a^{2} c d - a^{2} b e\right )} x^{2} - 3 \,{\left (a^{2} b d - a^{3} e\right )} x}{6 \, a^{4} x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x^4/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

1/2*(b^3*d - 2*a*b*c*d - a*b^2*e + a^2*c*e)*log(c*x^2 + b*x + a)/a^4 - (b^3*d - 2*a*b*c*d - a*b^2*e + a^2*c*e)
*log(abs(x))/a^4 + (b^4*d - 4*a*b^2*c*d + 2*a^2*c^2*d - a*b^3*e + 3*a^2*b*c*e)*arctan((2*c*x + b)/sqrt(-b^2 +
4*a*c))/(sqrt(-b^2 + 4*a*c)*a^4) - 1/6*(2*a^3*d + 6*(a*b^2*d - a^2*c*d - a^2*b*e)*x^2 - 3*(a^2*b*d - a^3*e)*x)
/(a^4*x^3)